<template>
    <Menu active-name="0-2" theme="light" width="auto" :open-names="['0']" @on-select="selectMenu">
        <Submenu name="0">
            <template slot="title">
                <Icon type="ios-navigate"></Icon>
                数据维护
            </template>
            <MenuItem name="0-1">
            <router-link to="/home/dataMaintain/echarts">
                <span style="color: #515a61">echarts</span>
            </router-link>
            </MenuItem>
            <router-link to="/home/dataMaintain/dataMaintain">
                <MenuItem name="0-2">
                <span style="color: #515a61">导入文件</span>
                </MenuItem>
            </router-link>
            <MenuItem name="0-3">
            <span style="color: #515a61">企业合并评价</span>
            </MenuItem>
            <MenuItem name="0-4">
            <span style="color: #515a61">部门数据导入</span>
            </MenuItem>
            <MenuItem name="0-5">
            <span style="color: #515a61">企业标签导入</span>
            </MenuItem>
        </Submenu>
        <Submenu name="1">
            <template slot="title">
                <Icon type="ios-navigate"></Icon>
                评价规则设置
            </template>
            <router-link to="/home/ruleSetting/termSetting">
                <MenuItem name="1-1">
                <span style="color: #515a61">评价期限设置</span>
                </MenuItem>
            </router-link>
            <router-link to="/home/ruleSetting/ruleSetting">
                <MenuItem name="1-2">
                <span style="color: #515a61">计算规则设置</span>
                </MenuItem>
            </router-link>
        </Submenu>
        <Submenu name="2">
            <template slot="title">
                <Icon type="ios-navigate"></Icon>
                <span>功能列表</span>
            </template>
            <router-link to="/home/ruleEngine/dataCenter">
                <MenuItem name="2-1">
                <span style="color: #515a61">文件分类</span>
                </MenuItem>
            </router-link>
            <router-link to="/home/ruleEngine/dataFactory">
                <MenuItem name="2-2">
                <span style="color: #515a61">流程设计</span>
                </MenuItem>
            </router-link>
            <router-link to="/home/systemManagement/printPdfDom">
                <MenuItem name="2-3">
                <span style="color: #515a61">打印pdf</span>
                </MenuItem>
            </router-link>
        </Submenu>
        <Submenu name="3">
            <template slot="title">
                <Icon type="ios-navigate"></Icon>
                <span>系统管理</span>
            </template>
            <router-link to="/home/systemManagement/fileManagement">
                <MenuItem name="3-1">
                <span style="color: #515a61">文件管理</span>
                </MenuItem>
            </router-link>
        </Submenu>
    </Menu>
</template>

<script>
export default {
    data() {
        return {
            linkArr:[
            ],
        }
    },
    components: {

    },
    mounted() {

    },
    methods: {
        // 菜单点击事件
        selectMenu(event) {
            console.log(event);
            if (event == `1-1`) {
                console.log("!!!");
                this.crumbsData1 = "评价规则设置";
                this.crumbsData2 = "评价期限设置";
            } else if (event == `1-2`) {
                this.crumbsData1 = "评价规则设置";
                this.crumbsData2 = "计算规则设置";
            } else if (event == `2-1`) {
                this.crumbsData1 = "功能列表";
                this.crumbsData2 = "文件分类";
            } else if (event == `2-2`) {
                this.crumbsData1 = "功能列表";
                this.crumbsData2 = "流程设计";
            } else if (event == `0-2`) {
                this.crumbsData1 = "数据维护";
                this.crumbsData2 = "参评企业导入";
            }
            console.log("!!!", this.crumbsData);
        },  
    },
}
</script>

<style lang="less" scoped></style>